﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="XinXetCong.aspx.cs" Inherits="ChamCong.NhanVien.XinXetCong" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <!--Calendar Script-->
    <link type="text/css" rel="stylesheet" href="../Scripts/JSCal/css/jscal.css" />
    <link type="text/css" rel="stylesheet" href="../Scripts/JSCal/css/border-radius.css" />
    <script type="text/javascript" src="../Scripts/JSCal/js/jscal2.js"></script>
    <script type="text/javascript" src="../Scripts/JSCal/js/lang/vn.js"></script>
    <!--End Calendar-->
    <style type="text/css">
        .style1
        {
            width: 130px;
            font-weight: bold;
            font-family: Tahoma;
        }
        .style2
        {
            width: 150px;
            font-weight: bold;
            font-family: Tahoma;
            font-size: 13px;
        }
        .style8
        {
            width: 184px;
        }
        .style9
        {
            width: 259px;
        }
        .newStyle1
        {
            font-weight: bold;
        }
        .style10
        {
            color: #FF0000;
        }
    </style>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#tblRequest").hide();
            $("#request").show();
            $('#request').click(function () {
                $("#tblRequest").slideToggle();
            });
        });
    </script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div>
        <asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" CssClass="childMenu"
            SkipLinkText="">
            <Items>
                <asp:MenuItem Text="Xem công" Value="" NavigateUrl="~/NhanVien/XinXetCong.aspx">
                </asp:MenuItem>
                <asp:MenuItem Text="Yêu cầu chờ duyệt" Value="" NavigateUrl="~/NhanVien/XinXetCong.aspx?ttd=0">
                </asp:MenuItem>
                <asp:MenuItem Text="Yêu cầu đã duyệt" Value="" NavigateUrl="~/NhanVien/XinXetCong.aspx?ttd=1">
                </asp:MenuItem>
                <asp:MenuItem Text="Yêu cầu không duyệt" Value="" NavigateUrl="~/NhanVien/XinXetCong.aspx?ttd=2">
                </asp:MenuItem>
            </Items>
        </asp:Menu>
    </div>
    <div>
        <table runat="server" id="tbXetCong" style="width: 400px; padding: 10px">
            <tr>
                <td class="style1">
                    Nhân Viên:
                </td>
                <td class="style9">
                    <asp:Label ID="lbHoTen" runat="server"></asp:Label><br />
                </td>
            </tr>
            <tr>
                <td class="style1">
                    Mã NV:
                </td>
                <td class="style9">
                    <asp:Label ID="lbMaNV" runat="server"></asp:Label><br />
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    Chọn ngày:
                    <asp:TextBox ID="txtNgay" runat="server"></asp:TextBox>
                    <script type="text/javascript">
                        Cal = new Calendar({
                            inputField: "txtNgay",
                            dateFormat: "%d/%m/%Y",
                            trigger: "txtNgay",
                            bottomBar: false,
                            onSelect: function () { this.hide(); }
                        });
                    </script>
                    <asp:Button ID="btnLoad" class="button" runat="server" Text="Load" OnClick="btnLoad_Click" />
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                        <ContentTemplate>
                            <sbc:sbcMsgBox ID="sbcMsgBox2" runat="server" UseJQuery="True" />
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </td>
            </tr>
        </table>
        <asp:UpdatePanel ID="ShowTTCong" runat="server">
            <ContentTemplate>
                <table runat="server" id="tbXetCongLoad" cellspacing="5" cellpadding="5" style="width: 600px;">
                    <tr>
                        <td colspan="2">
                            <asp:Label ID="lbThongTin" runat="server"></asp:Label>
                        </td>
                        <td rowspan="9" style="width: 20px">
                        </td>
                        <td rowspan="9">
                            <div id="notice" style="width: 100%; height: 100%; font-style: italic; background-color: White;">
                                <h3 style="font-style: normal;">
                                    Chú ý:
                                </h3>
                                <p>
                                    Mã Công:<br />
                                    + 1 : 1 ngày công - làm đủ thời gian quy định cho một công<br />
                                    + 1o: 3/4 ngày công - thời gian làm việc ít hơn 1 ngày công<br />
                                    + N : nửa ngày công - (làm 1 buổi) thời gian làm việc ít hơn 3/4 ngày công<br />
                                    + No: 1/4 ngày công - (làm nửa buổi) thời gian làm việc ít hơn nửa ngày công<br />
                                    + 0 : Vắng (không có làm việc), hoặc thời gian làm việc ít hơn 1/4 ngày công
                                </p>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Giờ đến:
                            <asp:Label ID="lbGioDen" runat="server" Font-Bold="True"></asp:Label>
                        </td>
                        <td class="style8">
                            Giờ về:
                            <asp:Label ID="lbGioVe" runat="server" Font-Bold="True"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                            Mã Công Làm Việc:
                        </td>
                        <td class="style8">
                            <asp:Label ID="lbMaCong" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                            Số Công Làm Việc:
                        </td>
                        <td class="style8">
                            <asp:Label ID="lbSoCong" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                            Số Giờ Tăng Ca:
                        </td>
                        <td class="style8">
                            <asp:Label ID="lbGioTangCa" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" class="style10">
                            <div id="request">
                                <a href="#"><strong><em>Tạo yêu cầu chỉnh sửa công: </em></strong></a>
                                <div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <table id="tblRequest">
                                <tr>
                                    <td class="style1">
                                        Công Làm Việc:
                                    </td>
                                    <td class="style8">
                                        <asp:DropDownList ID="drMaCong" runat="server" DataSourceID="DSLoaiCong" DataTextField="MaLoaiCong"
                                            DataValueField="SoCong">
                                        </asp:DropDownList>
                                        <asp:ObjectDataSource ID="DSLoaiCong" runat="server" SelectMethod="LayTatCa" TypeName="BusinessLogicLayer.LoaiCongBLL">
                                        </asp:ObjectDataSource>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style1">
                                        Số Giờ Tăng Ca:
                                    </td>
                                    <td class="style8">
                                        <asp:TextBox ID="txtGioTangCa" runat="server"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style1">
                                        Lý Do:
                                    </td>
                                    <td class="style8">
                                        <asp:TextBox ID="txtLyDo" runat="server" Height="40px" TextMode="MultiLine"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2" align="center">
                                        <asp:Button ID="btnGuiYeuCau" runat="server" Text="Gửi Yêu Cầu" OnClick="btnGuiYeuCau_Click"
                                            CssClass="button" />
                                        <asp:Button ID="btnHuy" runat="server" Text="Hủy" OnClick="btnHuy_Click" CssClass="button" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                <ContentTemplate>
                                    <sbc:sbcMsgBox ID="sbcMsgBox1" runat="server" UseJQuery="True" />
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    <div style="width: 600px; margin: 10px; float: left;">
        <asp:UpdatePanel ID="UpdatePanel4" runat="server">
            <ContentTemplate>
                <sbc:sbcMsgBox ID="sbcMsgBox3" runat="server" UseJQuery="True" />
            </ContentTemplate>
        </asp:UpdatePanel>
        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
            <ContentTemplate>
                <div style="float: left">
                    <asp:GridView ID="dgvXetCong0" runat="server" AutoGenerateColumns="False" OnRowDataBound="dgvXetCong0_RowDataBound"
                        CellPadding="4" ForeColor="#333333" GridLines="None" AllowPaging="True" PageSize="10"
                        OnPageIndexChanging="dgvXetCong0_PageIndexChanging">
                        <AlternatingRowStyle BackColor="White" />
                        <Columns>
                            <asp:BoundField DataField="Ma" HeaderText="Mã" SortExpression="Ma" />
                            <asp:BoundField DataField="Ngay" HeaderText="Ngày" DataFormatString="{0:dd/MM/yyyy}"
                                SortExpression="Ngay">
                                <HeaderStyle Width="90px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="MaNV" HeaderText="Mã NV" SortExpression="MaNV">
                                <HeaderStyle Width="30px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="HoTen" HeaderText="Họ Tên" SortExpression="HoTen">
                                <HeaderStyle Width="100px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="MaLoaiCong" HeaderText="Loại Công" SortExpression="MaLoaiCong">
                                <HeaderStyle Width="30px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="GioTangCa" HeaderText="Tăng Ca" SortExpression="GioTangCa">
                                <HeaderStyle Width="30px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="TrangThaiDoc" HeaderText="TTD" Visible="false"></asp:BoundField>
                            <%--<asp:BoundField DataField="HeSo" HeaderText="Hệ Số" SortExpression="HeSo" >
                                <HeaderStyle Width="30px" />
                                </asp:BoundField>--%>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:ImageButton ID="imgbtXem0" ImageUrl="~/Scripts/Image/Xem.jpg" Width="18px" Height="18px"
                                        runat="server" OnClick="imgbtXem0_Click" />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" CssClass="pager" />
                        <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                        <SortedAscendingCellStyle BackColor="#FDF5AC" />
                        <SortedAscendingHeaderStyle BackColor="#4D0000" />
                        <SortedDescendingCellStyle BackColor="#FCF6C0" />
                        <SortedDescendingHeaderStyle BackColor="#820000" />
                    </asp:GridView>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    <div style="width: 200px; float: right; padding-left: 0px; border-color: White;">
        <asp:UpdatePanel ID="UpdateXetCong" runat="server">
            <ContentTemplate>
                <table id="tbShow" cellpadding="2" runat="server" style="width: 200px; background-color: White;">
                    <tr>
                        <td class="style2">
                            Mã NV:
                        </td>
                        <td>
                            <asp:Label ID="lbMaNVs" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style2">
                            Họ Tên:
                        </td>
                        <td>
                            <asp:Label ID="lbHoTens" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style2">
                            Ngày:
                        </td>
                        <td>
                            <asp:Label ID="lbNgays" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style2">
                            Đến:
                            <asp:Label ID="lbGioDens" runat="server"></asp:Label>
                        </td>
                        <td class="style2">
                            Về:
                            <asp:Label ID="lbGioVes" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style2">
                            Mã Công Làm Việc:
                        </td>
                        <td>
                            <asp:Label ID="lbMaCongs" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style2">
                            Số Công Làm Việc:
                        </td>
                        <td>
                            <asp:Label ID="lbSoCongs" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style2">
                            Số Giờ Tăng Ca:
                        </td>
                        <td>
                            <asp:Label ID="lbGioTangCas" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" class="style10">
                            <strong><em>Xin Xét Lại: </em></strong>
                        </td>
                    </tr>
                    <tr>
                        <td class="style2">
                            Mã Công Làm Việc:
                        </td>
                        <td>
                            <asp:Label ID="lbMaCong2" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style2">
                            Số Giờ Tăng Ca:
                        </td>
                        <td>
                            <asp:Label ID="lbGioTangCa2" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style2">
                            Hệ Số Tăng Ca:
                        </td>
                        <td>
                            <asp:Label ID="lbHeSo2" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style2" colspan="2">
                            Lý Do:
                            <asp:TextBox ID="txtLyDos" runat="server" Height="40px" TextMode="MultiLine" Width="285px"
                                Enabled="false"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style2" colspan="2">
                            Phản hồi:
                            <asp:TextBox ID="txtChuThich" runat="server" Height="40px" TextMode="MultiLine" Width="285px"
                                Enabled="false"></asp:TextBox>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
</asp:Content>
